home *** CD-ROM | disk | FTP | other *** search
- /* $Revision: 1.2 $ */
-
- #ifndef __2COMP_H
- #define __2COMP_H
-
- #pragma pack(1)
-
- struct _2c_translate_info {
- char *cp;
- char digits[20];
- int neg, radix, dcount, bytes;
- };
-
- class ostream;
- class istream;
- class _2Comp {
- friend class ostream;
- friend class istream;
- static ostream & _cdecl insert(ostream&, const void *body, int bytes, int issigned);
- static int _cdecl format(unsigned char *body, char *buf, int bytes,
- int radix, int upper, int negative);
- static istream & _cdecl extract(istream &is, void *body, int bytes);
- static int _cdecl _2Comp::xlate(char *s, unsigned char *body,
- int radix, int negative, int bytes);
- static int _cdecl div(unsigned char *body, int d, int bytes);
- static void _cdecl negate(unsigned char *body, int bytes);
- };
-
- #pragma pack()
- #endif
-
-